﻿@model DingTalkAgent.Web.Models.RolePower
@{
    ViewBag.Title = "Nav_Action";
    Layout = null;
    var i = 1;
    var count = Model.SysNavList.FindAll(model => model.Parent_ID > -1).Count;
}
@*<div class="container-fluid">*@
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        @foreach (var Nav in @Model.SysNavList.Where(model => model.Parent_ID == -1))
        {
            <h4>@Nav.Name</h4>
            foreach (var Navx in @Model.SysNavList.Where(model => model.Parent_ID == @Nav.Nav_ID))
            {

                <div class="col-sm-4">
                    <div class="contact-box">
                        <p class="text-success">@Navx.Name</p>

                        <div class="col-sm-6">
                            <p class="text-primary" style="font-weight:bold;">数据权限</p>
                            <ul class="unstyled">
                                <li>
                                    @if (Navx.DataPower == 0)
                                            {
                                    <input type="radio" id="radio_@Navx.Page_ID" name="radio_@Navx.Page_ID" checked="checked" value="0" />
                                            }
                                            else
                                            {
                                    <input type="radio" id="radio_@Navx.Page_ID" name="radio_@Navx.Page_ID" value="0" />
                                            }
                                    <label for="rdbSelf" class="hand">本人</label>
                                </li>
                                <li>
                                    @if (Navx.DataPower == 1)
                                            {
                                    <input type="radio" id="radio_@Navx.Page_ID" name="radio_@Navx.Page_ID" checked="checked" value="1" />
                                            }
                                            else
                                            {
                                    <input type="radio" id="radio_@Navx.Page_ID" name="radio_@Navx.Page_ID" value="1" />
                                            }
                                    <label for="rdbSection" class="hand">服务部门</label>
                                </li>
                                <li>
                                    @if (Navx.DataPower == 2)
                                            {
                                    <input type="radio" id="radio_@Navx.Page_ID" name="radio_@Navx.Page_ID" checked="checked" value="2" />
                                            }
                                            else
                                            {
                                    <input type="radio" id="radio_@Navx.Page_ID" name="radio_@Navx.Page_ID" value="2" />
                                            }
                                    <label for="rdbAll" class="hand">全部</label>
                                </li>
                            </ul>
                        </div>
                        <div class="col-sm-6">
                            <p class="text-primary" style="font-weight:bold;">功能权限</p>
                            <ul class="unstyled">
                                @foreach (var Page in @Model.SysActionList.Where(model => model.Page_ID == Navx.Page_ID))
                                        {
                                <li>
                                    @if (Page.isMe == 0)
                                                {

                                            <input type="checkbox" id="checkbox_@Page.Act_ID" name="checkbox_@Page.Act_ID" value="@Page.Act_ID" />
                                                }
                                                else
                                                {
                                            <input type="checkbox" id="checkbox_@Page.Act_ID" name="checkbox_@Page.Act_ID" checked="checked" value="@Page.Act_ID" />
                                                }
                                    @Page.Act_Name
                                </li>
                                        }
                            </ul>
                        </div>
                        <div class="clearfix"></div>
                    </div>
                    </div>
                i++;
            }
        }
    </div>
</div>

